{% extends "todo/base.html" %}

{% block content %}
    <div class="row justify-content-center mt-5">
        <div class="col-md-5">
            <h2>Login</h2>
        </div>
    </div>
    <div class="row justify-content-center mt-5">
        <div class="col-md-5">
            {% if error %}
                <div class="alert alert-danger" role="alert">
                    {{ error }}
                </div>
            {% endif %}
            <form method="POST">
                {% csrf_token %}
                <div class="form-group">
                    <label for="username">Username</label>
                    <input type="text" name="username" class="form-control" id="username">
                </div>
                <div class="form-group">
                    <label for="password">Password</label>
                    <input type="password" name="password" class="form-control" id="password">
                </div>
                <button type="submit" class="btn btn-primary">Login</button>
            </form>
            <hr>
            <div class="text-center">
                Need an account? <a href="{% url 'signupuser' %}">Sign Up here</a>
            </div>
        </div>
    </div>
{% endblock %}
